# create by fanfan on 2020/3/27 0027
import keras
import tensorflow as tf
input_a = keras.Input(shape=(140,256))
input_b = keras.Input(shape=(140,256))

shared_lstm = keras.layers.LSTM(64)

# 在一个 GPU 上处理第一个序列
with tf.device('/gpu:0'):
    encode_a = shared_lstm(tweet_a)

with tf.device('/gpu:1'):
    encode_b = shared_lstm(tweet_b)

with tf.device('/cpu:0'):
    merged_vector = keras.layers.concatenate([encode_a,encode_a],axis=-1)
